<template>
<div>

<div class="i-layout-page-header">
  <PageHeader class="product_tabs" :title="$route.meta.title" hidden-breadcrumb></PageHeader>
</div>

<Row style="margin:1em;">
    <Col span="24" style="text-align:center;"><h1>{{ List.title }}</h1><span style="color:#0e90d2;">{{ List.publish_time }}</span></Col>
    <Col span="12" offset="6" style="font-size:1.2em;"><p v-html="List.content"></p></Col>
</Row>

</div>
</template>

<script>
    import { edit } from '@/api/notice';

    export default {
        name: 'home_notice_content',
        data () {
            return {
                loading: false,
                List: [],
            }
        },
        mounted () {
            this.init()
        },
        methods: {
            init () {
                this.loading = true
                edit(this.$route.query.id).then(async res => {
                    if (res.status === 200) {
                        this.List = res.data
                        this.loading = false
                    } else {
                        this.$Message.error(res.msg)
                    }
                }).catch(res => {
                    this.$Message.error(res.msg)
                })
            },
        }
    }
</script>

